<!--suppress ALL -->
<include file="./Template/header.html" />

<link rel="stylesheet" type="text/css" href="/Template/css/caseList.css?v=3">
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">

    $(function() {

        //初始化页面配置
        document.title = "病例展示";

        var app = new Vue({
            el: '#container',
            data: {
                caseList: [],
            },
            methods: {
                caseDetail: function(id) {
                    window.location.href = "/wechat/case/detail/id/"+id;
                },
                evaluate: function() {
                    window.location.href = "/wechat/evaluate";
                }
            }
        })

        function getCaseList(categoryId) {

            $.ajax({
                url:"/wechat/case/caseList",
                type:"post",
                data:{
                    categoryId: categoryId
                },
                dataType:"JSON",
                beforeSend:function(){
                    $("#loadingToast").show();
                },
                complete:function(){
                    $('#loadingToast').hide();
                },
                success:function(data){
                    app.caseList = data;
                },
            })
        }
        $(".search-box").change(function() {
            var value = $(this).find("option:selected").text();
            $(this).prev().attr('placeholder',value);
        });
        var str = location.href;
        getCaseList(str.substr(str.length-1,1));

    });


</script>

<div class="container">
    <!--div class="head-search">
        <span class="disease">病症：</span>
        <img class="icon-arrow" src="/Template/images/icon-arrow.png" alt="">
        <input class="search-line" type="text" placeholder="请选择所对应的症状" readonly>
        <select class="search-box" name="categoryId">
            <option value="0" class="choose">请选择所对应的症状</option>
            {:getCategorySelectOptionHtml($categoryId, 0)}
        </select>
    </div-->
    <div class="no-data" v-if="caseList == null")>暂无数据</div>
    <!--div>
        <div class="bg-img" v-for="desc in caseList">
            <div class="activity-info" v-on:click="caseDetail(desc.case_id)">
                <div class="activity-status">
                    <div class="label1" v-if="desc.type == 1">病例</div>
                    <div class="label2" v-if="desc.type == 2">讨论</div>
                    <div class="label3" v-if="desc.type == 3">筛查</div>
                </div>
                <div class="bg-img">
                    <img src="{{desc.title_image}}" alt="">
                </div>
            </div>
        </div>
    </div-->
    <div>
        <div v-for="desc in caseList">
            <div class="caselist-info" v-on:click="caseDetail(desc.case_id)">
                <div class="item">
                    <span>{{desc.title}}</span>
                    <img class="icon-right" src="/Template/images/icon-right.png" alt="">
                </div>
            </div>
        </div>
    </div>
    <div v-on:click="evaluate()">
        <div id="message" class="message">
            <img class="message-pic-back" src="/Template/images/icon-message-back.png" alt="">
        </div>
        <div id="message" class="message">
            <img class="message-pic" src="/Template/images/icon-evaluate.png" alt="">
        </div>
    </div>

    <!--div class="content-left" v-for="desc in caseList">
        <div class="activity-info"  v-on:click="caseDetail(desc.case_id)">
            <div class="bg-img">
                <img src="{{desc.title_image}}" alt="">
            </div>
        </div>

    </div-->

</div>
<include file="./Template/footer.html" />

